<?php

namespace common\models\ar;

use Yii;

/**
 * This is the model class for table "user_broker_commission_grant_record".
 *
 * @property int $id 自增Id
 * @property int $brokerId 代理商Id
 * @property string $grantMoney
 * @property string $time 提取佣金时间
 * @property string $grantdesc 备注
 * @property int $tradeId 返佣对应的交易Id
 */
class UserBrokerCommissionGrantRecord extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'user_broker_commission_grant_record';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['brokerId', 'grantMoney'], 'required'],
            [['brokerId', 'tradeId'], 'integer'],
            [['grantMoney'], 'number'],
            [['time'], 'safe'],
            [['grantdesc'], 'string', 'max' => 50],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'brokerId' => 'Broker ID',
            'grantMoney' => 'Grant Money',
            'time' => 'Time',
            'grantdesc' => 'Grantdesc',
            'tradeId' => 'Trade ID',
        ];
    }
}
